<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="x-ua-compatible" content="ie=7" />
    <meta name="Author" content="">
    <title>语轶商务咨询有限公司</title>
    <link href="${pageContext.request.contextPath}/css/css_whir.css" rel="stylesheet" type="text/css" />
    <script src="${pageContext.request.contextPath}/Script/jquery-1.4.2.min.js" type="text/javascript"></script>
<!--[if IE 6]>
<script src="Script/pngAlaph.js"></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->

</head>
<body>
    
    <!--top-->
    <%@ include file="head.jsp"%>
    <!--top End-->
    
    <!--Star-->
    <div class="Body_bg">
    <div class="Banner" style="background:url(images/temp/Ban_faq.jpg) no-repeat center top;"><div class="bg"></div></div>
    <div class="Content">  
    
           <!--Sidebar-->
           <div class="Sidebar">
                          <div class="Menu">
                  <h4><img src="images/Nav_faq.png" onclick="javascript:location.href='faq.html'"/></h4>
                  <ul>
                         <li class="End"><a id="menu2" href="${pageContext.request.contextPath}/teachers/show">在线预约</a></li>
                         <li><a id="menu3" href="${pageContext.request.contextPath}/leave/show">我要留言</a></li>
                  </ul>
               </div>
           </div>
           <!--Sidebar End-->
           <!--Right-->
           <div class="RightSidebar">
                <div class="Current">您现在的位置：首页 > 外教服务 > <span>一对一外教</span></div>
                <div class="MainContent">
                    <form action="${pageContext.request.contextPath}/order/add?tid=${param.tid}" method="post">
                        <!--Star-->
                        <table border="0" cellspacing="0" cellpadding="0" class="My_table">
                            <tr>
                              <td class="name"><span>*</span>姓名：</td>
                              <td><input name="oname" type="text" class="textYY" id="name"/><span id="sname"></span></td>
                            </tr>
                            <tr>
                              <td class="name"><span>*</span>电话号码：</td>
                              <td><input name="ophone" type="text" class="textYY" id="phone"/><span id="sphone"></span></td>
                            </tr>
                            <tr>
                              <td class="name"><span>*</span>电子邮箱：</td>
                              <td><input name="omail" type="text" class="textYY" id="mail"/><span id="smail"></span></td>
                            </tr>
                            <tr>
                              <td class="name"><span>*</span>学员年龄：</td>
                              <td><input name="oage" type="text" class="textYY"/></td>
                            </tr>
                            <tr>
                              <td class="name"><span>*</span>城市：</td>
                              <td><input name="ocity" type="text" class="textYY"/></td>
                            </tr>
                            <tr>
                              <td class="name" valign="top"><span></span>需求：</td>
                              <td>  <textarea name="oneed" class="text02YY" ></textarea></td>
                            </tr>
                            <tr>
                              <td class="name" valign="top"><span></span>备注：</td>
                              <td> <textarea name="oremark" class="text02YY" ></textarea></td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td><input type="submit" value=" " class="btn01" id="submit" disabled /></td>
                            </tr>
                        </table>

                    </form>
                    <script>
                        $(function (){
                            $("#phone").keyup(function (){
                                var phone = $("#phone").val();
                                if(phone.length!=11){
                                    $("#sphone").html("请输入11位数字的手机号").css("color","red");
                                    $("#submit").attr("disabled",true);
                                }else {
                                    if(/^1(3|4|5|7|8)\d{9}$/.test(phone)){
                                        $("#sphone").html("");
                                        $("#submit").removeAttr("disabled");
                                    }
                                    else {
                                        $("#sphone").html("号码格式不正确").css("color","red");
                                        $("#submit").attr("disabled",true);


                                    }

                                }

                            });
                            $("#mail").keyup(function (){
                                var mail = $("#mail").val();
                                var isEmail = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
                                if(isEmail.test(mail)){
                                    $("#submit").removeAttr("disabled");
                                    $("#smail").html("");
                                }else {
                                    $("#smail").html("邮箱格式不正确！").css("color","red");
                                    $("#submit").attr("disabled","true");
                                }

                            });


                        });
                    </script>
                        <!--End-->
                
                <div class="clear">
                    <c:if test="${not empty mes}">
                        <input type="hidden" id="mes" value="${mes}">
                        <script>
                            var data = $("#mes").val();
                            alert(data)
                        </script>
                    </c:if>

                </div>
                </div>
           </div>
           <!--Right End-->

    <div class="space25"></div>                   
    </div>
    </div>
    <!--End-->
    
    <!--bottom-->
    <%@ include file="tail.jsp"%>
    <!--bottom End-->
    
    <script type="text/javascript" language="javascript">
       jQuery("#nav4").attr("class","onnav");
	   jQuery("#menu2").attr("class","acur");
    </script>
</body>
</html>
